<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>圣杯布局v1</title>
    <style>
        * {
            padding: 0;
            margin: 0;
        }

        body, html {
            width: 100%;
            height: 100%;
            text-align: center;
        }

        header, footer {
            width: 100%;
            height: 10%;
            background-color: cyan;
        }

        main {
            width: 100%;
            height: 80%;
            background-color: purple;
        }

        aside {
            width: 10rem;
            height: 100%;
            background-color: wheat;
            float: left;
        }

        /*footer {*/
        /*    width: 100%;*/
        /*    height: 10%;*/
        /*    background-color: gray;*/
        /*}*/

        .center {
            float: left;
            width: calc( 100% - 20rem);
            height: 100%;
            background-color: #fff;
        }

        .right {
            float: right;
            width: 10rem;
            height: 100%;
        }
    </style>
</head>
<body>
<header>header</header>
<main>
    <aside>left</aside>
    <main class="center">center</main>
    <aside class="right">right</aside>
</main>
<footer>footer</footer>
</body>
</html>
